package com.itheima.oop.d6_homework.practise03;

/**
 * 实体类
 */
public class Teacher {
    private String name;
    private String num;

    public Teacher(){

    }

    public Teacher(String name, String num) {
        this.name = name;
        this.num = num;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNum() {
        return num;
    }

    public void setNum(String num) {
        this.num = num;
    }
    public void teach(){
        System.out.println("工号为" + getNum() + "的" + getName() + "正在讲课");
    }
}
